<style lang="less">
    .form-detail-vue {
        .h-panel-body {
            padding-right: 60px;
        }
        .info-basic {
            margin-top: 30px;
            margin-bottom: 30px;
        }
        .info-table {
            margin-top: 30px;
            .h-tabs {
                margin-bottom: 20px;
            }
         }
        .info-title {
            font-size: 16px;
            font-weight: bold;
        }
        .table-wrapper {
            padding: 0 20px;
        }
    }
</style>

<template>
    <div class="users-vue frame-page h-panel form-detail-vue">
        <div class="h-panel h-panel-no-border">
            <div class="h-panel-body">
                <Loading text="读取中" :loading='loading'></Loading>
                <div class="info-title">基本信息</div>
                <!-- 基础信息 -->
                <Form class="info-basic" :label-width="90" mode="threecolumn" readonly>
                    <FormItem label="名称：">{{data.name}}</FormItem>
                   <#list table.commonFields as field>

                    <FormItem label="${field.comment}：">{{data.${field.propertyName}}}</FormItem>
                   </#list>
                </Form>


                <div class="info-title">其他信息</div>
                <!-- 其他信息 -->
                <Form class="info-basic" :label-width="90" mode="twocolumn" readonly>
                   <#list table.fields as field>
                       <#if field.propertyName != "name">

                    <FormItem label="${field.comment}：">{{data.${field.propertyName}}}</FormItem>
                       </#if>
                   </#list>
                </Form>
            </div>
        </div>
    </div>

</template>
<script>
    export default {
        data() {
            return {
                loading: false,
                data: {
               <#list table.commonFields as field>
                   ${field.propertyName}: null,
               </#list>
               <#list table.fields as field>
                   ${field.propertyName}: null,
        </#list>
        }
    };
        },
        mounted() {
            this.loading = true; //开启模块load动画
            R.${entity}.get(this.$route.params.id).then(resp => {
                if (resp.ok) {
                this.data = resp.data;
            }
            this.loading = false; //关闭模块load动画
        });

        }
    };
</script>
